package uutalk.netcloud.talk.base.mqtt;

import android.util.Log;

import java.io.UnsupportedEncodingException;

import uutalk.netcloud.talk.base.mqtt.model.Publication;

/**
 * Created by hujie on 17/3/30.
 */

public class PublishFactory {

    public static Publication createPublication(String payload) {

        try {
            payload = new String(payload.getBytes(),"utf-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        Publication publication = new Publication("uutalk/server/cmd/1.0/cn/", payload, 0, true);
        Log.d("publication", payload);
        return publication;
    }

}
